package com.jc.springCloud.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

@Service
public class TestService {
	@Autowired
    RestTemplate restTemplate;

	//调用远程服务
    public String hiService(String name) {
        return restTemplate.getForObject("http://service1/test?name="+name,String.class);
    }

}
